feat(tools-babel): Add tools-babel package for babel configuration and parsing support#4087
Open
feat(tools-babel): Add tools-babel package for babel configuration and parsing support#4087
Conversation
1ab7c49 to
d67e42a
Compare
…/jasonvmo/tools-babel
…/jasonvmo/tools-babel
tido64
reviewed
Apr 14, 2026
Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
…oft/rnx-kit into user/jasonvmo/tools-babel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: this currently includes the tools-performance change as it depends on that change. Ignore those files here.
Description
This adds a tools project for dealing with babel with regards to react-native transformations. This builds upon some of the work from the metro-transformer-oxc package as well as some of the work I was looking at for using native tools for transformation.
This package has tools that deal with babel configuration and parsing.
Babel Configuration
Several utilities are provided here:
@react-native/metro-babel-transformer, which is the standard upstream babel transformer for react-native.Babel Parsing
Parsing is one of the most time consuming and memory intensive parts of the transformation process. There are faster parsers but they generally produce estree ASTs rather than babel-ASTs. The current metro-transformer-oxc uses a utility estree-to-babel to convert the AST, which mostly works, but when timing the performance it ends up being almost as slow as babel parsing.
The parsing in here:
The tests are fairly wordy for output but this is useful for allowing tools like Claude to gain information about what is happening and what the differences are.